home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python2.5-minimal.prerm < prev    next >
Text File  |  2008-10-05  |  958b  |  42 lines

  1. #! /bin/sh -e
  2.  
  3. case "$1" in
  4.     remove)
  5.     if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
  6.         echo "Unlinking and removing bytecode for runtime python2.5"
  7.     fi
  8.     for hook in /usr/share/python/runtime.d/*.rtremove; do
  9.         [ -x $hook ] || continue
  10.         $hook rtremove python2.5 || continue
  11.     done
  12.     dpkg -L python2.5-minimal \
  13.         | awk '/\.py$/ {print $0"c\n" $0"o"}' \
  14.         | xargs rm -f >&2
  15.  
  16.     if [ -x /usr/sbin/update-binfmts ]; then
  17.         /usr/sbin/update-binfmts --package python2.5 \
  18.         --remove python2.5 /usr/bin/python2.5
  19.     fi
  20.  
  21.         ;;
  22.     upgrade)
  23.         dpkg -L python2.5-minimal \
  24.         | awk '/\.py$/ {print $0"c\n" $0"o"}' \
  25.         | xargs rm -f >&2
  26.         ;;
  27.     deconfigure)
  28.         ;;
  29.     failed-upgrade)
  30.         ;;
  31.     *)
  32.         echo "prerm called with unknown argument \`$1'" >&2
  33.         exit 1
  34.     ;;
  35. esac
  36.  
  37. rmdir /usr/local/lib/python2.5/site-packages 2>/dev/null && \
  38.         rmdir /usr/local/lib/python2.5 2>/dev/null || \
  39.         true
  40.  
  41.  
  42.